<form id="formContent">
    <input type="hidden" name="userId" th:value="${user?.userId}">
    <div th:if="${user?.username != null}" class="form-group row">
        <label for="username" class="col-sm-2 col-form-label">用户名</label>
        <div class="col-sm-10">
            <input type="text" th:value="${user?.username}" readonly="readonly"
                   name="username" class="form-control" id="username"
                   placeholder="填写用户名" required>
            <div class="invalid-feedback">请填写用户名</div>
        </div>
    </div>
    <div class="form-group row">
        <label for="c_password" class="col-sm-2 col-form-label">密码</label>
        <div class="col-sm-10">
            <input type="password" name="password" class="form-control"
                   id="c_password"
                   placeholder="请填写密码" required>
            <div class="invalid-feedback">请填写密码</div>
        </div>
    </div>
    <div class="form-group row">
        <label for="c_cpassword" class="col-sm-2 col-form-label">密码</label>
        <div class="col-sm-10">
            <input type="password" name="cpassword" class="form-control"
                   id="c_cpassword"
                   placeholder="请再次填写密码" required>
            <div class="invalid-feedback">请再次填写密码</div>
        </div>
    </div>
</form>